package com.system.server;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import javafx.application.Platform;
import java.io.IOException;

public class MainUI extends Application {

    public void start(Stage primaryStage) throws IOException {

        Platform.runLater(() -> {

            Object[] paneList=new Object[3];

            VBox mainPane=new MainInter().creatMainUIPane(paneList,primaryStage);
            VBox userPane=new UserInter().creatUserUIPane(paneList,primaryStage);
            VBox foodPane=new FoodInter().creatFoodUIPane(paneList,primaryStage);


            paneList[0]=mainPane;
            paneList[1]=userPane;
            paneList[2]=foodPane;

            StackPane pane=new StackPane();
            pane.getChildren().add(mainPane);
            pane.getChildren().add(userPane);
            pane.getChildren().add(foodPane);

            Scene scene=new Scene(pane,300,300);
           // URL css=getClass().getResource("../css/UI.css");
         //   scene.getStylesheets().add(css.toString());
            primaryStage.setScene(scene);
            primaryStage.setTitle("管理员主界面");
            primaryStage.show();
        });

    }
}
